<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //     function processString (s) {
    //     var arr = s.split('');
    //     var new_arr = arr.map((item) => {
    //         return item === item.toUpperCase()? item.toLowerCase() : item.toUpperCase()
    //     });
    //     return new_arr.join('');
    // }
    // console.log(processString('AbC'));
    console.log(1)
   async function a(){
        console.log(2)
        await b()
        console.log(3)
    }
    function b(){
        console.log(4)
    }
    a()
    new Promise ((resolve,reject)=>{
        console.log(5)
        resolve(6)
    }).then((value)=>{
        console.log(value)
    })
    setTimeout(() => {
        console.log(7)
    }, 0);
    // 1,2,4,5
    // 1,2,5,4,3,6,7
    </script>
</body>
</html>